using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DNAide.Drawing;

public partial class image_manipulation_filters : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
	}

	protected override void OnInit(EventArgs e)
	{
		Transform1.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform1_ApplyTransformations);
		Transform2.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform2_ApplyTransformations);
		Transform3.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform3_ApplyTransformations);
		Transform4.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform4_ApplyTransformations);
		Transform5.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform5_ApplyTransformations);
		Transform6.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform6_ApplyTransformations);
		Transform7.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform7_ApplyTransformations);
		Transform8.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform8_ApplyTransformations);
		Transform9.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform9_ApplyTransformations);
		Transform10.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform10_ApplyTransformations);
		Transform11.ApplyTransformations += new DNAide.Web.UI.Controls.DNAideImageControl.ApplyTransformationsEventHandler(Transform11_ApplyTransformations);
		base.OnInit(e);
	}


	void Transform1_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.GrayScale(bitmapToTransform);
	}

	void Transform2_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Invert(bitmapToTransform);
	}

	void Transform3_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Brightness(bitmapToTransform, 100);
	}

	void Transform4_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Contrast(bitmapToTransform, 50);
	}

	void Transform5_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Sharpen(bitmapToTransform, 11);
	}

	void Transform6_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Smooth(bitmapToTransform, 1);
	}

	void Transform7_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.GaussianBlur(bitmapToTransform, 4);
	}

	void Transform8_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Gamma(bitmapToTransform, 1, 2, 3);
	}

	void Transform9_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.EmbossLaplacian(bitmapToTransform);
	}

	void Transform10_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Pixellate(bitmapToTransform, 10, true);
	}

	void Transform11_ApplyTransformations(object sender, ref System.Drawing.Bitmap bitmapToTransform)
	{
		BitmapAide.Water(bitmapToTransform, 10, true);
	}
}
